package com.hawkstar66.practice.funny.commons;

public class StringUtils {

	private final static String EMPTYSTR = "";
	
	public static boolean isEmpty(String str) {
		if(null == str) {
			return true;
		}
		
		if(EMPTYSTR.equals(str.trim())) {
			return true;
		}
		return false;
	}
	
	public static String trimToEmpty(String str) {
		if(isEmpty(str)) {
			return EMPTYSTR;
		}
		return str.trim();
	}
}
